package com.mk.admin.controller;

import com.mk.admin.model.ResultDto;
import com.mk.admin.model.query.DoctorGuidanceTemplateQuery;
import com.mk.admin.model.vo.DoctorGuidanceTemplateVo;
import com.mk.admin.service.DoctorGuidanceTemplateService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/a/adm/doctorGuidanceTemplate")
@Api(tags = "医生就诊指引模板")
public class DoctorGuidanceTemplateController {

    @Autowired
    private DoctorGuidanceTemplateService doctorGuidanceTemplateService;

    @PostMapping("/select")
    public ResultDto select(@RequestBody DoctorGuidanceTemplateQuery query) {
        return doctorGuidanceTemplateService.select(query);
    }

    @PostMapping("/add")
    public ResultDto add(@RequestBody DoctorGuidanceTemplateVo doctorGuidanceTemplateVo) {
        return doctorGuidanceTemplateService.add(doctorGuidanceTemplateVo);
    }

    @PostMapping("/update")
    public ResultDto update(@RequestBody DoctorGuidanceTemplateVo doctorGuidanceTemplateVo) {
        return doctorGuidanceTemplateService.update(doctorGuidanceTemplateVo);
    }

    @PostMapping("/delete")
    public ResultDto delete(@RequestBody DoctorGuidanceTemplateVo doctorGuidanceTemplateVo) {
        return doctorGuidanceTemplateService.delete(doctorGuidanceTemplateVo.getId());
    }

    @PostMapping("/status")
    public ResultDto status(@RequestBody DoctorGuidanceTemplateVo doctorGuidanceTemplateVo) {
        return doctorGuidanceTemplateService.status(doctorGuidanceTemplateVo.getId());
    }
}
